package cn.demo.controller;

import cn.crabc.core.app.util.Result;
import cn.demo.mapper.BaseTestMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * crabc集成spring 示例demo
 *
 * @author yuqf
 */
@RestController
@RequestMapping("/api/demo")
public class BaseTestController {

    @Autowired
    private BaseTestMapper baseTestMapper;

    @GetMapping("/list")
    public Result test() {
        return Result.success(baseTestMapper.selectList());
    }
}
